home *** CD-ROM | disk | FTP | other *** search
/ Macworld Expo - Develope…Central & Net Innovations / Developer Central and Net Innovators (MacWorld Expo) (January 1999).iso / Developer Central / Metrowerks CodeWarrior / CodeWarrior Pro 4 Release Notes / Libraries Notes / MSL Release Notes / MSL 2.3a8 Release Notes < prev    next >
Encoding:
Text File  |  1998-01-11  |  13.9 KB  |  366 lines  |  [TEXT/CWIE]

  1. ========================================================================
  2. Metrowerks Standard Library Release Notes 
  3. ========================================================================
  4.  
  5. Version: CWPro2 Update
  6. Date:    December 23, 1997
  7. Author:  Vicki S. Scott, Michael Marcotty,  Matt Fassiotto, 
  8.          John Maffei, Howard Hinnant, Ron Liechty 
  9.          
  10. ========================================================================
  11.  
  12. This release of MSL contains some significant bug fixes since the 
  13. release of CWPro2.  Most importantly, however, namespace std has been 
  14. enabled.
  15.  
  16.  
  17. ========================================================================
  18. New Features in This Version
  19. ========================================================================
  20.  
  21. *  Namespace std enabled.  This is a major code change in the library 
  22.    involving renaming all the headers.  Please read the notes on using 
  23.    namespace std carefully at the end of this document. 
  24.  
  25. *  Added numeric capability for the x86 platforms. 
  26.  
  27. *  Improved clock on Mac platforms to take advantage of O/S capability. 
  28.    Please read the notes on how to implement if you would like this 
  29.    additional functionality. 
  30.    
  31. *  SIOUX WASTE has been upgraded from 1.3a4 to version 1.3a6. 
  32.  
  33. *  C9X functions for x86: 
  34.  
  35.    - full implementation of the floating point unit interface as 
  36.       specified in fenv.h, and additional functions feset/getprec 
  37.       
  38.    - isnormal, fpclassify, signbit macros/functions are now in fpce.obj 
  39.      
  40.  
  41. ========================================================================
  42. Bugs Fixed in This Version 
  43. ========================================================================
  44.  
  45. *  abort_exit.c 
  46.    Fixes a bug in close of console window on the x86 when stdin has  
  47.    been closed. 
  48.  
  49. *  complex
  50.    Removed extraneous declaration of pow function. 
  51.  
  52. *  Numerous C++ headers 
  53.    Removed all "#pragma dont_inline" statements for template functions.  
  54.    This was a bug introduced in CWP2 where some of the statements had 
  55.    been removed, but not all of them, causing inlining to be off in  
  56.    C++ functions. 
  57.    
  58. *  wchar_t.h 
  59.    Fixed a bug with defining compiler versions. 
  60.    
  61. *  functional 
  62.    Enable mem_fun functions. 
  63.    
  64. *  list, deque, tree.h
  65.    Fixed name look up problem with iterator and const_iterator
  66.    
  67. *  vector, queue 
  68.    Include deque header. 
  69.    
  70. *  scanf.c 
  71.    Fixed a bug with the return value. 
  72.    
  73. *  cmath 
  74.    (MW02783)  
  75.    Fixed a bug in classification macros where parenthesis were missing. 
  76.   
  77. *  complex.cpp 
  78.    (MW02812)
  79.    Fixed a bug passing mixed types.  The declaration of polar now meets 
  80.    the C++ Standard.  The following error message is now fixed: 
  81.    
  82.        / Error   : ambiguous access to overloaded funciton 
  83.        // 'powd<d>(const complex<double> &, double)' 
  84.        // ' powd(const complex &, const T &)' 
  85.        // ComplexText.cpp line29  powd(Cx.2.0) 
  86.    
  87. *  iterator
  88.    Move iterator fix from mcompile.h to iterator header file 
  89.    
  90. *  Fixed auto_ptr to use mutable. 
  91.    
  92. *  iosfwd
  93.    removed traits typedef because it is non-standard and conflicted with
  94.    other uses of the identifier "traits".
  95.  
  96. *  mmemory.h and bstring
  97.    Fixed destroy method for basic_string_ref
  98.    
  99. *  buffer_io.c, file_pos.c 
  100.    Fixed a problem with EOL differences between Mac and Win32.  
  101.    
  102. *  file_io.mac.c, path2fss.c 
  103.    Allows "." files to be opened on a Mac. 
  104.    
  105. *  iostream, mlocale, iostream.cpp, MSLPrefixPartial.h
  106.    Fixes a memory leak. 
  107.    
  108. *  Fixed a bug in SIOUX.c to correct the action of the \r character 
  109.    for the first line.  Previously, random results occurred with 
  110.    this character on the first line of output.  Now, the action of 
  111.    backing up to the beginning of the line and starting at the first 
  112.    character behaves as expected. 
  113.  
  114.  
  115. ========================================================================
  116. Known Bugs and Incompatibilities
  117. ========================================================================
  118.  
  119. *  Wide character support is still not supported in this library, but  
  120.    it will be supported in all library routines in the next release.  
  121.    This includes new header files wchar.h and wctype.h. 
  122.  
  123. *  MW02614 
  124.    MW02687 
  125.    On 68K for 8-byte doubles, using function pointers to ANSI math 
  126.    functions do not work.  
  127.    
  128. *  MW01261
  129.    Precision of printing doubles is incorrect even when values are 
  130.    exact (e.g., int).  This will be fixed in Pro3. 
  131.  
  132. *  string and reverse_iterator are lacking operator !=. There is a 
  133.    generic operator != that string and reverse_iterator can use.  To 
  134.    enable the generic operator !=, issue a 
  135.        using namespace std::rel_ops; 
  136.    in your code before you use operator!= on strings or 
  137.    reverse_iterators.
  138.  
  139. ========================================================================
  140. Additional Notes
  141. ========================================================================
  142.  
  143. *  Improved clock for Mac platforms
  144.    To increase the tick count for the Mac platforms in order to use the 
  145.    facilities the Operating System provides, please change the following 
  146.    file:  
  147.      Metrowerks Standard Library/MSL C/MSL Mac/Public Includes/
  148.      timesize.mac.h
  149.    This file introduces a define (__TIMESIZE_DOUBLE) which enables the 
  150.    improved clock code in time.h and time.mac.c.  Please note that the 
  151.    clock_t typedef will change from an unsigned long to a type double. 
  152.    This also means that the clock function will change types.  Be sure 
  153.    you confirm in your code base that your return values are typed 
  154.    accordingly for clock and clock_t.
  155.       
  156. *  Using namespace std in MSL
  157.    This release of MSL has namespace std enabled on by default.  You  
  158.    may disable std if your code is not ported to std yet.  However, 
  159.    there are many backward compatibility features built into this 
  160.    release.  Your code will likely compile fine, even if it is namespace 
  161.    ignorant.
  162.    
  163.    The details of how to use this backward compatibility are as follows: 
  164.    
  165.    How to install:
  166.    ===============
  167.  
  168.    The folder, Metrowerks Standard Library, should be replaced entirely.
  169.    The folders MacOS Support and Win32-x86 Support under CodeWarrior 
  170.    (not Metrowerks Standard LIbrary), should have files placed INTO 
  171.    them (note the ->INTO notation).  IMPORTANT:  Install the compiler
  172.     update 2.0.1 before you install this update.  
  173.    
  174.    After installing the files, run the "Build MSL Libraries" script to
  175.    rebuild whatever libraries you use.  Also use the project
  176.    "MSL C++ Headers.mcp" to rebuild your precompiled headers.
  177.  
  178.    General Directions for doing the namespace thing:
  179.    ===================================================================
  180.  
  181.    Namespace applies only to C++ projects.  C projects are unaffected 
  182.    by the namespace settings.  You can turn namespaces on and off.  
  183.    This is a multi-step process:
  184.  
  185.    1.  #define or comment out MSIPL_USING_NAMESPACE in ansi_parms.h.  
  186.        This controls the C half of the library.
  187.  
  188.    2.  #define or comment out MSIPL_USING_NAMESPACE in mcompile.h.  This
  189.        controls the C++ half of the library.
  190.  
  191.    3.  Recompile the libraries using either the project files in the bin
  192.        directories (for C and for C++), or use the build script (build
  193.        script highly reccommended).  You will also need to rebuild your
  194.        precompiled headers.
  195.  
  196.    The namespace update has a great deal of backward compatibility built
  197.    into it.  Part of this backward compatibility is dictated by the C++
  198.    standard.  Part of it is offered as an extension to the standard by
  199.    Metrowerks.  The bottom line is that your namespace-ignorant code is
  200.    likely to compile and run just fine!  If not, the fix to make it run
  201.    should be very easy (explained below).
  202.  
  203.    The Nov. '97 standard defines the following headers:
  204.  
  205.                        Table 2--C++ Library Headers
  206.  
  207.     +------------------------------------------------------------------+
  208.     |<algorithm>    <iomanip>    <list>      <ostream>     <streambuf> |
  209.     |<bitset>       <ios>        <locale>    <queue>       <string>    |
  210.     |<complex>      <iosfwd>     <map>       <set>         <typeinfo>  |
  211.     |<deque>        <iostream>   <memory>    <sstream>     <utility>   |
  212.     |<exception>    <istream>    <new>       <stack>       <valarray>  |
  213.     |<fstream>      <iterator>   <numeric>   <stdexcept>   <vector>    |
  214.     |<functional>   <limits>                                           |
  215.     +------------------------------------------------------------------+
  216.  
  217.    3 The facilities of the Standard C Library are provided in 18 additional
  218.      headers, as shown in Table 3:
  219.  
  220.               Table 3--C++ Headers for C Library Facilities
  221.  
  222.            +--------------------------------------------------+
  223.            |<cassert> <ciso646> <csetjmp> <cstdio>  <ctime>   |
  224.            |<cctype>  <climits> <csignal> <cstdlib> <cwchar>  |
  225.            |<cerrno>  <clocale> <cstdarg> <cstring> <cwctype> |
  226.            |<cfloat>  <cmath>   <cstddef>                     |
  227.            +--------------------------------------------------+
  228.  
  229.    All of these headers bury the C++ and C libraries under namespace std.
  230.    This means that printf is now named std::printf, and cout is now named
  231.    std::cout.
  232.  
  233.    Don't panic, help is on the way!  The standard defines the following
  234.    headers for backward compatibility:
  235.  
  236.                             Table 1--C Headers
  237.  
  238.      +----------------------------------------------------------------+
  239.      | <assert.h>   <iso646.h>   <setjmp.h>   <stdio.h>    <wchar.h>  |
  240.      | <ctype.h>    <limits.h>   <signal.h>   <stdlib.h>   <wctype.h> |
  241.      | <errno.h>    <locale.h>   <stdarg.h>   <string.h>              |
  242.      | <float.h>    <math.h>     <stddef.h>   <time.h>                |
  243.      +----------------------------------------------------------------+
  244.  
  245.    If you use these headers instead of the <cstdio> type guys, then the
  246.    symbol std::printf will appear to be named printf in your program
  247.    (even with namespaces turned on!).                                       
  248.  
  249.    Additionally, Metrowerks defines the following headers:
  250.  
  251.    +--------------------------------------------------------------------+
  252.    |<algorithm.h>  <iomanip.h>  <list.h>    <ostream.h>   <streambuf.h> |
  253.    |<bitset.h>     <ios.h>                  <queue.h>                   |
  254.    |<complex.h>    <iosfwd.h>   <map.h>     <set.h>       <typeinfo.h>  |
  255.    |<deque.h>      <iostream.h>             <sstream.h>   <utility.h>   |
  256.    |<exception.h>  <istream.h>  <new.h>     <stack.h>     <valarray.h>  |
  257.    |<fstream.h>    <iterator.h> <numeric.h> <stdexcept.h> <vector.h>    | 
  258.    |<functional.h>                                                      |
  259.    +--------------------------------------------------------------------+
  260.  
  261.    These headers are analogous to the <stdio.h> headers.  If you use these
  262.    then the std::library will appear to your code to be in the global
  263.    namespace;  that is the symbol std::cout will appear to have the name
  264.    cout.
  265.  
  266.    Currently the following headers are not yet implemented:
  267.      <cwchar>     <wchar.h>
  268.      <cwctype>    <wctype.h>
  269.  
  270.    To summarize:
  271.  
  272.    ===================================
  273.    #include <iostream>
  274.  
  275.    int main()
  276.    {
  277.       std::cout << "Hi\n";
  278.       return 0;
  279.    }
  280.  
  281.     // Runs fine.
  282.    ===================================
  283.    #include <iostream>
  284.    using namespace std;
  285.  
  286.    int main()
  287.    {
  288.       cout << "Hi\n";
  289.       return 0;
  290.    }
  291.  
  292.    // Runs fine.
  293.    ===================================
  294.    #include <iostream>
  295.  
  296.    int main()
  297.    {
  298.       cout << "Hi\n";
  299.       return 0;
  300.    }
  301.  
  302.    // Error: Undefined identifier cout
  303.    ===================================
  304.    #include <iostream.h>
  305.  
  306.    int main()
  307.    {
  308.       cout << "Hi\n";
  309.       return 0;
  310.    }
  311.   
  312.    // Runs fine.
  313.    ===================================
  314.  
  315.    Note:  The C++ and Runtime libs must be recompiled whenever you turn namespaces
  316.    on or off.
  317.  
  318. *  Using the functions in fenv.h on X86:
  319.  
  320.    In this version of fenv.h, the functionality provided is intended to 
  321.    match that of the Macintosh platforms.  The header follows the 
  322.    current draft standard; however, there are a couple of minor 
  323.    differences on the X86 platforms.
  324.    
  325.    The committee changed the names of feget/setexcept to 
  326.    feget/setexceptflag.  On X86, the latest are the functions and the 
  327.    former are macros defined in fenv.h. 
  328.    
  329.    The functions feset/getprec and feset/getround are more straight- 
  330.    forward and perform better than feset/getenv as they manipulate 
  331.    particular bits of just the control word instead of the whole fp 
  332.    environment.  Please use these functions instead.
  333.    
  334.    Currently it is difficult to distinguish between the feget/
  335.    setexceptflags functions from feupdateenv/feraiseexcept functions.  
  336.    The intention of the set/getexceptflags functions is to provide 
  337.    additional information about the floating point exception environment. 
  338.    For instance, the type fexcept_t should be a struct containing not 
  339.    only the fpu information, but also an array of structs that provide 
  340.    more information about a particular exception.  For example, this 
  341.    struct would tell which function and its arguments caused a specific  
  342.    exception.  This practice is sometimes used in the Microsoft 
  343.    environment for writing exception handlers.  However, this has not 
  344.    been implemented in this release of fenv.h.  Instead, fexcept_t is 
  345.    the control word and status word as it is on the Mac.  If users 
  346.    request this added functionaity, we will implement it in a future 
  347.    release.  Otherwise, we will maintain compatibility of fexcept_t 
  348.    across platforms.
  349.  
  350.  
  351. ========================================================================
  352. Contacting Metrowerks
  353. ========================================================================
  354.  
  355. For bug reports, technical questions, and suggestions, please use the
  356. forms in the Release Notes folder on the CD, and send them to
  357.  
  358. support@metrowerks.com
  359.  
  360. See the CodeWarrior on the Nets document in the Release Notes folder for
  361. more contact information, including a list of Internet newsgroups, 
  362. on-line services, and patch and update sites.
  363.  
  364. ========================================================================
  365.  
  366.